package com.huike.web.controller.contract;

import com.github.pagehelper.Page;
import com.huike.common.annotation.Log;
import com.huike.common.core.controller.BaseController;
import com.huike.common.core.domain.AjaxResult;
import com.huike.common.core.domain.entity.SysUser;
import com.huike.common.core.page.TableDataInfo;
import com.huike.common.enums.BusinessType;
import com.huike.contract.domain.vo.TransferVo;
import com.huike.contract.service.ITransferService;
import com.huike.contract.service.impl.TransferServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.function.BiConsumer;

@RestController
@RequestMapping("/transfer")
public class TransferController extends BaseController {

    @Autowired
    TransferServiceImpl transferServiceImpl;


    /** 查询转派列表 信息*/
    @GetMapping("list")
    public TableDataInfo  list(SysUser user){
        List<TransferVo> list = transferServiceImpl.list(user);
        //把service传过来的list的数据提交到getDataTablePage里面 进行分页 并且返回对应的成功total ，code，msg，params
        return getDataTablePage(list);
    }
}